package com.meihuak.cloud_ordering.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.meihuak.cloud_ordering.bean.OrderTable;

import java.util.List;

public interface OrderService extends IService<OrderTable> {

    /**查询*/
    public Long getOrderIdByParam(OrderTable orderTable);

    public Long getOrderMaxKeyId();

    public int getOrderCount();

    /**
     * 获取窗口下的所有订单
     */
    public List<OrderTable> getWinAllOrderByBid(int id);

    /**
     * 获取窗口的当前未完成订单数
     */
    public int getWinNoFinishOrderNumBybid(int id);

    /**
     * 根据父订单id获取商家id
     */
    public int getBusinessByOrderId(long id);

    /**
     * 获取等待时间
     */
    public int getOrderWaitTime(Long id);

    /**
     * 完成订单
     * @param oid
     */
    void finishOrder(Long oid);
}
